home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Programming
/
AmigaE
/
Src
/
Tools
/
AmigaLib
/
argarray.e
< prev
next >
Wrap
Text File
|
1995-03-30
|
1KB
|
47 lines
OPT MODULE
MODULE 'icon',
'other/split',
'workbench/startup',
'workbench/workbench'
DEF cxlib_arg, cxlib_dobj:PTR TO diskobject
EXPORT PROC argArrayInit(str=NIL)
DEF argmsg:PTR TO wbstartup, lock=NIL
IF iconbase=NIL
RETURN NIL
ELSEIF argmsg:=wbmessage
IF argmsg.arglist.lock THEN lock:=CurrentDir(argmsg.arglist.lock)
cxlib_dobj:=GetDiskObject(argmsg.arglist.name)
IF lock THEN CurrentDir(lock)
RETURN IF cxlib_dobj THEN cxlib_dobj.tooltypes ELSE NIL
ELSE
RETURN cxlib_arg:=argSplit(str)
ENDIF
ENDPROC
EXPORT PROC argArrayDone()
IF iconbase
IF wbmessage
FreeDiskObject(cxlib_dobj)
ELSE
DisposeLink(cxlib_arg)
ENDIF
ENDIF
ENDPROC
EXPORT PROC argString(tt:PTR TO LONG, entry, defaultstring)
DEF res=NIL
IF tt AND (iconbase<>NIL)
res:=FindToolType(tt, entry)
ENDIF
ENDPROC IF res THEN res ELSE defaultstring
EXPORT PROC argInt(tt:PTR TO LONG, entry, defaultval)
DEF res=NIL
IF tt AND (iconbase<>NIL)
IF res:=FindToolType(tt, entry) THEN StrToLong(res, {defaultval})
ENDIF
ENDPROC defaultval